package a.a;

import a.c.bb;
import a.c.e;
import a.c.w;
import a.c.*;
import a.c.z;
import a.i.a.d;
import a.i.db;
import a.i.y;

public class q
{
  public static int a;
  
  public static bb[] a(a.c.q paramq)
  {
    int i = m.b;
    boolean bool = m.a;
    z localz = new z();
    y localy = new y(paramq);
    label117:
    label119:
    do
    {
      if (paramq.n()) {
        break;
      }
      bb localbb = b(paramq);
      localz.add(localbb);
      if (i != 0) {
        break label131;
      }
      if (bool) {
        break label127;
      }
      w localw = localbb.l();
      if (localw.e()) {}
      while (i != 0)
      {
        localy.a(localw.d().l());
        localw.f();
        if (i != 0) {
          break label119;
        }
        if (bool) {
          break label117;
        }
        if (!bool) {
          break;
        }
      }
      localy.a(localbb);
    } while (!bool);
    localy.g();
    label127:
    return (bb[])localz.toArray(new bb[localz.size()]);
  }
  
  public static bb b(a.c.q paramq)
  {
    int j = m.b;
    boolean bool = m.a;
    bb localbb = new bb();
    d locald = new d(paramq);
    Object localObject = paramq.v();
    e locale1;
    do
    {
      do
      {
        if (!((w)localObject).e()) {
          break;
        }
        locale1 = ((w)localObject).d();
        locald.a(locale1, locale1.c());
        ((w)localObject).f();
      } while (!bool);
    } while (j != 0);
    localObject = db.a(new boolean[paramq.k()]);
    label122:
    do
    {
      for (;;)
      {
        if (!locald.a())
        {
          locale1 = locald.c();
          localbb.add(locale1);
          ((x)localObject).a(locale1, true);
          w localw1 = locale1.o();
          e locale2;
          if (localw1.e()) {
            locale2 = localw1.d();
          }
          do
          {
            if (!bool)
            {
              if (!((x)localObject).getBool(locale2))
              {
                w localw2 = locale2.o();
                do
                {
                  if (!localw2.e()) {
                    break label229;
                  }
                  e locale3 = localw2.d();
                  if (bool) {
                    break;
                  }
                  if (!((x)localObject).getBool(locale3))
                  {
                    int i = locald.b(locale3);
                    locald.b(locale3, i - 1);
                  }
                  localw2.f();
                } while (!bool);
              }
              localw1.f();
              if (j != 0) {
                break label129;
              }
              if (!bool) {
                break label122;
              }
              if (j != 0) {
                break label134;
              }
              localw1 = locale1.o();
            }
            if (!localw1.e()) {
              break;
            }
            locale2 = localw1.d();
          } while (j != 0);
          if (!bool)
          {
            if (!((x)localObject).getBool(locale2))
            {
              locald.c(locale2);
              ((x)localObject).a(locale2, true);
            }
            localw1.f();
            if (!bool) {
              break;
            }
          }
        }
      }
    } while (j != 0);
    label129:
    label134:
    label229:
    return localbb;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.a.q

 * JD-Core Version:    0.7.0.1

 */